package Server;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import client.quit;

public class exit {
	private Statement stmt;

	/**
	 * 
	 */
	public void windowClose(Connection con1, Object msg) {
		Object b = msg;
		quit q = (quit)b; 
		try {
			stmt = con1.createStatement();
			stmt.executeUpdate("UPDATE users SET logged=0 WHERE username='" + q.getUser() + "'");
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
}

